package com.fansl.allround.common.core.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author fansl
 * @Description: 用户认证关系状态枚举类
 * @date 2019/10/10 18:43
 */
@Getter
@AllArgsConstructor
public enum UserOauthStatusEnum {
    BIND(1,"绑定"),
    UNBIND(0,"解绑");

    /**
     * 类型
     */
    private final int code;
    /**
     * 描述
     */
    private final String description;

    public static UserOauthStatusEnum getByCode(int code){
        for (UserOauthStatusEnum statusEnum:UserOauthStatusEnum.values()){
            if(statusEnum.getCode()==code){
                return statusEnum;
            }
        }
        return BIND;
    }
}
